package com.kevin.design.structuralPattern.adapter;
// 类适配器
public class ClassAdapter {
    public static void main(String[] args) {
        TargetClass targetClass = new AdapterClass();
        targetClass.t1();
        targetClass.t2();
    }
}
interface TargetClass{
    void t1();
    void t2();
}

class AdapteeClass{
    protected void m1(){
        System.out.println("m1");
    }
    protected void m2(){
        System.out.println("m2");
    }
}

class AdapterClass extends AdapteeClass implements TargetClass{

    @Override
    public void t1() {
        m1();
    }

    @Override
    public void t2() {
        m2();
    }
}
